home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $VER: Jitter.irx 0.03 (14 May 1997) **
- **
- ** (c) 1997 Ernesto Poveda Cortes
- **
- ** PROGRAMNAME:
- ** Jitter.irx
- **
- ** FUNCTION:
- ** Makes an object to jitter its points.
- **
- ** $HISTORY:
- **
- ** 14 May 1997 : 0.03 : Working version...
- ** 14 May 1997 : 0.01 : initial release
- */
-
-
-
- OPTIONS RESULTS /* enable return codes */
- ADDRESS 'Imagine.1'
-
- OPTIONS FAILAT 6 /* ignore warnings */
- SIGNAL ON SYNTAX /* ensure clean exit */
-
- NL = '0A'x
- /* ------------------------------------------------------------------- */
-
- IMAGINETOFRONT
-
- IF ~EXISTS('LIBS:rexxreqtools.library') THEN DO
- NOTIFY 'Please install the rexxreqtools.library into your LIBS: directory'
- NOTIFY 'It is available from /pub/aminet/util/rexx/RexxReqTools.lha'
- exit
- END
- CALL ADDLIB('rexxreqtools.library',0,-30,0)
-
- IF ~EXISTS('LIBS:rexxmathlib.library') THEN DO
- CALL rtezrequest('Please install the rexxmathlib.library into your LIBS: directory' || NL || NL ||,
- 'The library is available from pub/aminet/util/rexx/RexxMathLib1.3.lha','Great, thanks!','Go get RexxMathLib.library','rt_reqpos = reqpos_centerscr')
- exit
- END
- CALL ADDLIB('rexxmathlib.library',0,-30,0)
-
- displayrexxptr ON
-
- call rtezrequest("Jitter.irx - 1997 Ernie",'_Good|_Exit','U have launched...','rt_reqpos = reqpos_centerscr')
- if ~rtresult then call BYE
-
- /* why w instead of x?? well, REXX does not like to use x as variable...*/
- w = rtgetlong(0,'Enter X value','X = ',,'rt_reqpos = reqpos_centerscr')
- if ~rtresult then call BYE
- y = rtgetlong(0,'Enter Y value','Y = ',,'rt_reqpos = reqpos_centerscr')
- if ~rtresult then call BYE
- z = rtgetlong(0,'Enter Z value','Z = ',,'rt_reqpos = reqpos_centerscr')
- if ~rtresult then call BYE
-
- if ((w==0) & (z==0) & (y==0)) then do
- call rtezrequest("X=0, Y=0 , Z=0 ??"||NL||"You Must use at least a non zero value",'_Oops','Problem:','rt_reqpos = reqpos_centerscr')
- call BYE
- end
-
- smooth = 0
-
- call rtezrequest('Wanna Smooth it?','_Yes|_No','Maybe...','rt_reqpos = reqpos_centerscr')
- if rtresult then do
- smooth = rtgetlong(5,'Enter Smooth value','Smoothing',,'rt_reqpos = reqpos_centerscr')
- end
-
- /* ------------------------------------------------------------------- */
- transform_translate 0 0 0 /* This will make the undo works :-) */
- getgeometry
- getaxisinfo
-
- /* Diferent calls, diferent objects ...*/
- random(,,time(s))
-
- do i= 1 to pnt_num
- if w>0 then pnt_x.i = pnt_x.i+ random(0,w)
- if y>0 then pnt_y.i = pnt_y.i+ random(0,y)
- if z>0 then pnt_z.i = pnt_z.i+ random(0,z)
- end
-
- setgeometry
-
- if (smooth>0) then smoothingtoollock smooth
-
- /* ------------------------------------------------------------------- */
-
- BYE:
- ActivateImagine
- displayrexxptr OFF
- EXIT
-
- SYNTAX:
-
- notify "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
- ActivateImagine
- displayrexxptr OFF
- EXIT
-
-